/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufc.quixada.adrs.dao;

import br.ufc.quixada.adrs.dao.config.PostGresMapConfig;
import br.ufc.quixada.adrs.model.QuestionarioQuantitativo;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author fernando
 */
public class QuestionarioQuantitativoDAO {

    public List<QuestionarioQuantitativo> getByProdutorId(Long id) throws SQLException {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public QuestionarioQuantitativo getByVisitaId(Long id) throws SQLException {
        return (QuestionarioQuantitativo) PostGresMapConfig.getSqlMapClient().queryForObject("getQuestionarioQuantitativoByVisitaId", id);
    }

    public QuestionarioQuantitativo getById(Long id) throws SQLException {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    private Long proxId() throws SQLException {
        Long l = (Long) PostGresMapConfig.getSqlMapClient().queryForObject("getMaxQuantitativoId");
        if (l == null) {
            l = 0L;
        }
        return l + 1;
    }
}
